import os
import sys
import cv2

def getPathRoot():
    dirname, filename = os.path.split(os.path.abspath(sys.argv[0]))
    dir_project_data = os.path.abspath(os.path.join(dirname, os.path.pardir))
    return dir_project_data

g_filename = "%s\\%s" % (getPathRoot(),  r'images\lena.jpg')
img = cv2.imread(g_filename)


#_, gray1 = cv2.threshold(img, 150, 0xff, cv2.THRESH_BINARY)
#image1 = cv2.resize(gray1, (int(img.shape[1]/4), int(img.shape[0]/4)))

cv2.imshow('Hello,world!',img)
cv2.waitKey()
cv2.destroyAllWindows()